$OpenBSD: patch-modules_java_CMakeLists_txt,v 1.3 2015/01/30 21:38:37 zhuk Exp $
1. JNI shared object is installed in the same directory, so this should
   be under lib/.
2. Avoid exporting opencv_java together with other targets, unbreaks calling
   find_package(OpenCV) without opencv-java package being installed.
--- modules/java/CMakeLists.txt.orig	Wed Oct  1 11:33:36 2014
+++ modules/java/CMakeLists.txt	Thu Jan 29 21:20:33 2015
@@ -280,7 +280,7 @@ else(ANDROID)
   if(WIN32)
     set(JAR_INSTALL_DIR java)
   else(WIN32)
-    set(JAR_INSTALL_DIR share/OpenCV/java)
+    set(JAR_INSTALL_DIR lib/OpenCV/java)
   endif(WIN32)
   install(FILES ${JAR_FILE} DESTINATION ${JAR_INSTALL_DIR} COMPONENT java)
 endif(ANDROID)
@@ -357,11 +357,11 @@ if(ANDROID)
           ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT java)
 else()
   if(NOT INSTALL_CREATE_DISTRIB)
-    ocv_install_target(${the_module} EXPORT OpenCVModules
+    ocv_install_target(${the_module}
             RUNTIME DESTINATION ${JAR_INSTALL_DIR} COMPONENT java
             LIBRARY DESTINATION ${JAR_INSTALL_DIR} COMPONENT java)
   else()
-    ocv_install_target(${the_module} EXPORT OpenCVModules
+    ocv_install_target(${the_module}
             RUNTIME DESTINATION ${JAR_INSTALL_DIR}/${OpenCV_ARCH} COMPONENT java
             LIBRARY DESTINATION ${JAR_INSTALL_DIR}/${OpenCV_ARCH} COMPONENT java)
   endif()
